Definition
Taking total derivative of f(x(y), y) with respect to y (exogenous variable), we will have 
At the optimizer, according to FOC,
, so we have:
When to use Envelope Theorem
We always make two assumptions in order to use the Envelope theorem:
(1) CQC holds at the maximizer
(2) smooth dependence of the maximizer on the parameters
General Procedure for Envelop Theorem
Assume we have a unique global optimizer that is differentiable (with non-singular
) and SCS holds, we need only:
(1) write out the Lagrangian, L*, including the relevant parameters
(2) Differentiate L* with respect to the relevant parameter 
(3) Evaluate
at the original parameter value
and the solution corresponding to the original parameter value 
(4) By the Envelope Theorem,
Note:
(1) The problem need not be set up in Standard Form to apply the Envelop Theorem
(2) If a minimization problem has been changed to maximization for Standard Form, then we must be careful to switch the sign of the result from the Envelop Theorem when discussing the impact on the original, minimization problem.
(3) Envelope theorem works with optimization problem.
Note
Example

s.t.
When t =
, we find a maximizer 
Calculate the total derivative of
, with respect to t:
Write out
By Envelope Theorem